API = new Object();

API.Toggle = function(id, class1, class2){
	var el = document.getElementById(id);
	var cl = el.className;
	if (cl.indexOf(class1)!=-1)
		cl = cl.replace(new RegExp("\s*"+class1+"\s*"), class2);
	else if (cl.indexOf(class2)!=-1)
		cl = cl.replace(new RegExp("\s*"+class2+"\s*"), class1);
	el.className = cl;
};
